<template>
    <component :is="tag" :class="['heading','heading-'+this.grade]">
      <i v-if="grade=='1'" class="heading-icon"></i>
      <span v-if="this.grade=='2'" class="heading-2-inner">
        <slot></slot>
      </span>
      <slot v-else></slot>
    </component>
</template>

<script>
  export default {
    componentName: 'EHeading',
    props: {
      grade: {
        type: String,
        default: '1'
      },
      tag: {
        type: [String, Object],
        default: 'div'
      }
    }
  }
</script>
